/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Estructuras;

public class sched_entity {
    long vruntime;           
    long sum_exec_runtime;
    long prev_sum_exec_runtime;
    long exec_start;
    
    long waitToExec;//Tiempo que espera en schedull para ejecutarse

    //es el ultimo ciclo de reloj que el proceso se estuvo ejecutando
    long tiempoSale;


    load_weight load;   //Nuevo (Leonardo)
    long exec_max;

    //Atributos relacionados con las estadisticas
    long wait_start;    //Tiempo que comienza a esperar para ejecutar
    long wait_max;      //Tiempo maximo que espera para ejecutarse
    long wait_sum;      //Tiempo total de espera
    long wait_count;    //Numero de veces que el proceso espera


    
    //rb_node run_node; 
   public sched_entity(long vr, long ser, long pser, long es){
        this.vruntime = vr;
        this.sum_exec_runtime = ser;
        this.prev_sum_exec_runtime = pser;
        this.exec_start = es;
        this.waitToExec = 0;//Tiempo acumulado que espera en schedull para ejecutarse
        //es el ultimo ciclo de reloj que el proceso se estuvo ejecutando
        this.tiempoSale =0;


        this.load = new load_weight();  //Nuevo (Leonardo)
        this.exec_max = 0;
        this.wait_max = 0;
        this.wait_start = 0;
        this.wait_sum = 0;
        this.wait_count = 0;
   }



  public long getTiempoSale() {
    return tiempoSale;
  }

  public void setTiempoSale(long tiempoSale) {
    this.tiempoSale = tiempoSale;
  }

  

  public long getWaitToExec() {
    return waitToExec;
  }

  public void setWaitToExec(long waitToExec) {
    this.waitToExec = waitToExec;
  }





    public long getVruntime(){
       return this.vruntime;
    }
    
    public long getExecSum(){
       return this.sum_exec_runtime;
    }
    
    public long getPrevSum(){
       return this.prev_sum_exec_runtime;
    }
    
    public long getExecStart(){
       return this.exec_start;
    }
    
    public void setVruntime(long vr){
        this.vruntime = vr;
    }
    
    public void setExecSum(long es){
        this.sum_exec_runtime = es;
    }
    
    public void setPrevSum(long ps){
        this.prev_sum_exec_runtime = ps;
    }
    
    public void setExecStart(long start){
        this.exec_start = start;
    }

    //Nuevo (Leonardo)
    public load_weight getLoad() {
        return load;
    }
    //Nuevo (Leonardo)
    public void setLoad(load_weight load) {
        this.load = load;
    }

    //Nuevo (Leonardo)
    public long getExec_max() {
        return exec_max;
    }

    //Nuevo (Leonardo)
    public void setExec_max(long exec_max) {
        this.exec_max = exec_max;
    }

    public long getWait_max() {
        return wait_max;
    }

    public void setWait_max(long wait_max) {
        this.wait_max = wait_max;
    }

    public long getWait_start() {
        return wait_start;
    }

    public void setWait_start(long wait_start) {
        this.wait_start = wait_start;
    }

    public long getWait_sum() {
        return wait_sum;
    }

    public void setWait_sum(long wait_sum) {
        this.wait_sum = wait_sum;
    }

    public long getWait_count() {
        return wait_count;
    }

    public void setWait_count(long wait_count) {
        this.wait_count = wait_count;
    }

    public void increase_wait_count(){
        this.wait_count++;
    }

    public void increase_wait_sum(long delta){
        this.wait_sum += delta;
    }

}

